<?php

namespace mbilling\BillingBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class BonusesForm extends AbstractType
{
    protected $coupons;

    public function __construct($coupons)
    {
        $this->coupons = $coupons;
    }
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder->add('name', 'text');
        $builder->add('sum', 'text');
        $builder->add('adding', 'text');
        $builder->add('coupon', 'choice', array('choices' => $this->coupons));
        $builder->add('coupon_num', 'text');
        $builder->add('is_percent', 'checkbox', array('required' => false));
        $builder->add('is_active', 'checkbox', array('required' => false));
    }
}